#pragma once
#include "unordered_Hashtable.h"

template<class K, class V, class Hash = HashFunc<K>>
class my_unordered_map
{
	struct MapKeyOfT
	{
		const K& operator()(const pair<K, V>& kv)
		{
			return kv.first;
		}
	};

public:
	typedef typename Open::HashTable<K, pair<const K, V>, MapKeyOfT, Hash>::iterator iterator;

	iterator begin()
	{
		return mp.begin();
	}

	iterator end()
	{
		return mp.end();
	}

	bool insert(const pair<K, V>& kv)
	{
		return mp.insert(kv);
	}

private:
	Open::HashTable<K, pair<const K, V>, MapKeyOfT, Hash> mp;
};